package mmc.gl.shader;

import static org.lwjgl.opengl.GL20.*;

public class OrbShader extends ShaderProgram {
	
	Shader fs = new Shader("mmc/gl/shader/OrbShader.fs");
	Shader vs = new Shader("mmc/gl/shader/OrbShader.vs");
	
	Uniform u_radius;
	
	public OrbShader(){
		attach(fs);
		attach(vs);
		link();
		
		u_radius = new Uniform("radius");
	}
	
	private static OrbShader instance;
	
	public void setRadius(float radius){
		glUniform1f(u_radius.location, radius);
	}
	
	public static OrbShader get(){
		if(instance==null)
			instance = new OrbShader();
		
		return instance;
	}
}
